set dimension and position of frame